<%@ page import="com.hf.constant.OrderLunchConst"%>
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"><!--<![endif]-->
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title><g:layoutTitle default="Grails"/></title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link rel="shortcut icon" href="${resource(dir: 'images', file: 'favicon.ico')}" type="image/x-icon">
		<link rel="apple-touch-icon" href="${resource(dir: 'images', file: 'apple-touch-icon.png')}">
		<link rel="apple-touch-icon" sizes="114x114" href="${resource(dir: 'images', file: 'apple-touch-icon-retina.png')}">
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}" type="text/css">
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'mobile.css')}" type="text/css">
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'menu.css')}" type="text/css">
		<g:javascript library="jquery" plugin="jquery"/>
		<g:layoutHead/>
		<r:layoutResources />
		<g:javascript src="menu.js"/>
		<g:javascript src="jquery.cookie.js"/>
	</head>
	<body>
		<div id="grailsLogo" role="banner"><a href="http://grails.org"><img src="${resource(dir: 'images', file: 'grails_logo.png')}" alt="Grails"/></a></div>
		<g:if test="${session?.user?.name == OrderLunchConst.ADMIN_NAME}">
			<div id="menuContainer" class="menuContainer">
			    <jq:jquery>
			    	var menu = new Menu({
			    		id:'upgradeMenu',
			    		targetContainer:'#menuContainer',
			    		expandNodes:[''],
			    		menuNodes:[
			    			{id:'orderUserMenu',title:'OrderUser',items:[{id:'listOrderUser',url:'<g:createLink controller="orderUser" action="list"/>',text:'List'},
									    			{id:'createOrderUser',url:'<g:createLink controller="orderUser" action="create"/>',text:'Create'}]},
	
			    			{id:'UserFetchSummaryMenu',title:'UserFetchSummary',items:[{id:'listUserFetchSummary',url:'<g:createLink controller="UserFetchSummary" action="list"/>',text:'List'},
									    			{id:'createUserFetchSummary',url:'<g:createLink controller="userFetchSummary" action="create"/>',text:'Create'}]},
							
							{id:'fetchGroupMenu',title:'Fetch Group',items:[{id:'listFetchGroup',url:'<g:createLink controller="fetchGroup" action="list"/>',text:'List'},
									    			{id:'createFetchGroup',url:'<g:createLink controller="fetchGroup" action="create"/>',text:'Create'}]},
	
			    			{id:'userBillPeriodHistoryMenu',title:'userBillPeriodHistory',items:[{id:'listuserBillPeriodHistory',url:'<g:createLink controller="userBillPeriodHistory" action="list"/>',text:'List'},
									    			{id:'createuserBillPeriodHistory',url:'<g:createLink controller="userBillPeriodHistory" action="create"/>',text:'Create'}]},
	
			    			{id:'userOrderHistoryMenu',title:'UserOrderHistory',items:[{id:'listUserOrderHistory',url:'<g:createLink controller="UserOrderHistory" action="list"/>',text:'List'},
									    			{id:'createUserOrderHistory',url:'<g:createLink controller="UserOrderHistory" action="create"/>',text:'Create'}]},
	
							{id:'systemConfigMenu',title:'System Config',items:[{id:'listSystemConfig',url:'<g:createLink controller="systemConfig" action="list"/>',text:'List'},
									    			{id:'createSystemConfig',url:'<g:createLink controller="systemConfig" action="create"/>',text:'Create'}]},
									    	
			    		]
			    	});
			    </jq:jquery>
			</div>
		    <div class="bodyContainer">
					<g:layoutBody/>
		    </div>
	    </g:if>
	    <g:else>
	    	<h1>Sorry, bad link.</h1>
	    </g:else>
	    <div class="clear"></div>
		<div class="footer" role="contentinfo"></div>
		<div id="spinner" class="spinner" style="display:none;"><g:message code="spinner.alt" default="Loading&hellip;"/></div>
		<g:javascript library="application"/>
		<r:layoutResources />
	</body>
</html>
